<template>
  <p align="center">是否确定删除此成员？</p>
  <div class="del_dialog_button">
    <el-button type="success" @click="success">是</el-button>
    <el-button type="danger" @click="negate">否</el-button>
  </div>
</template>
<script>
import "../assets/main.css";
import axios from "axios";
export default {
  data(){
    return{

    }
  },
  methods:{
    // 是按钮
    success(){
      let accountPost = "http://localhost:8090/user/delete?account="+this.account;
      axios.delete(accountPost).then(res=>{
        if (res.data.success){
          alert("删除成功");
        }else{
          alert("删除失败");
        }
      });
      this.$emit("delData",false);
    },

    // 否按钮
    negate(){
      this.$emit("delData",false);
    }
  },
  props:["account"]
}
</script>